<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <meta name="renderer" content="webkit|ie-comp|ie-stand">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta http-equiv="Cache-Control" content="no-siteapp"/>
    <link href="/erp/assets/css/bootstrap.min.css" rel="stylesheet"/>
    <link rel="stylesheet" href="/erp/css/style.css"/>
    <link href="/erp/assets/css/codemirror.css" rel="stylesheet">
    <link rel="stylesheet" href="/erp/assets/css/ace.min.css"/>
    <link rel="stylesheet" href="/erp/font/css/font-awesome.min.css"/>
    <link href="/erp/assets/css/bootstrap.min.css" rel="stylesheet"/>
    <link rel="stylesheet" href="/erp/css/style.css"/>
    <link rel="stylesheet" href="/erp/assets/css/ace.min.css"/>
    <link rel="stylesheet" href="/erp/assets/css/font-awesome.min.css"/>
    <link rel="stylesheet" href="/erp/Widget/zTree/css/zTreeStyle/zTreeStyle.css" type="text/css">
    <link href="/erp/Widget/icheck/icheck.css" rel="stylesheet" type="text/css"/>
    <!--[if lte IE 8]>
    <link rel="stylesheet" href="/erp/assets/css/ace-ie.min.css"/>
    <![endif]-->
    <script src="/erp/js/jquery-1.9.1.min.js"></script>
    <script src="/erp/assets/js/bootstrap.min.js"></script>
    <script src="/erp/assets/js/typeahead-bs2.min.js"></script>
    <script src="/erp/assets/js/jquery.dataTables.min.js"></script>
    <script src="/erp/assets/js/jquery.dataTables.bootstrap.js"></script>
    <script src="/erp/assets/layer/layer.js" type="text/javascript"></script>
    <script src="/erp/assets/laydate/laydate.js" type="text/javascript"></script>
    <script src="/erp/js/displayPart.js" type="text/javascript"></script>
    <title>出入库单录入</title>
</head>

<body>
<div class="margin clearfix">
    <div class="Shops_Audit">
        <div class="search_style">

            <ul class="search_content clearfix">
                <li><label class="l_f">出/入库单号</label>
                    <input name="" type="text" class="text_add" id="ioNo" placeholder="请输入出/入库单号" style=" width:180px"/>
                </li>
                <li><label class="l_f">批次</label>
                    <input name="" type="text" class="text_add" id="batch" placeholder="请输入批次号" style=" width:180px"/>
                </li>
                <li style="width:90px;">
                    <button type="button" class="btn_search" id="allBount"><i class="icon-search"></i>查询</button>
                </li>
            </ul>
        </div>
        <!---->
        <div class="border clearfix">
       <span class="l_f">
        <a href="javascript:" id="bu" class="btn btn-warning"><i class="icon-plus"></i>出库添加</a>
		 <a href="javascript:" id="bb" class="btn btn-warning"><i class="icon-plus"></i>入库添加</a>
       </span>
        </div>
        <!---->

        <!--申请列表-->
        <div class="audit_list">
            <table class="table table-striped table-bordered table-hover" id="sample-table">
                <thead>
                <tr>

                    <!--<th width="25"><label><input type="checkbox" class="ace"><span class="lbl"></span></label></th>-->
                    <th width="80px">序号</th>
                    <th width="80px">出\入库单号</th>
                    <th width="100">出入库类型</th>
                    <th width="80px">批次</th>
                    <th width="70">产品名称</th>
                    <th width="70">产品数量</th>
                    <th width="80px">仓库名称</th>
                    <th width="80px">出/入库时间</th>
                    <th width="100">调拨相关单号</th>
                </tr>
            </table>
                <input type="hidden" id="hidden">
        </div>
    </div>
</div>
</body>
</html>
<script>

    $(function () {
        <!--DataTable数据显示-->
        var oTable1 = $('#sample-table').DataTable({
            "serverSide": true,     // true表示使用后台分页
            ajax: {
                "url": "/io-warehouse/all",  // 异步传输的后端接口url
                "type": "POST",  // 请求方式
                data: function (d) {
                    var param = {};
                    param.draw = d.draw;
                    param.start = d.start;
                    param.length = d.length;
                    param.ioNo=$("#ioNo").val();
                    param.batch=$("#batch").val();
                    return param;//自定义需要传递的参数。
                }
            },
            bFilter: false, //是否启动过滤、搜索功能
            "bStateSave": true,//状态保存
            'autoWidth': true,
            "columns": [
                {
                    "data": "id"
                },
                {"data": "ioNo"},
                {"data": "ioType"},
                {"data": "batch"},
                {"data": "pname"},
                {"data": "pnum"},
                {"data": "wname"},
                {"data": "ioTime"},
                {"data": "allotId"},
            ]
        });

        //刷新
        $('#hidden').on('click', function () {
            console.log("test");
            oTable1.ajax.reload();
        })

        //条件查询
        $("#allBount").on('click', function () {
            oTable1.ajax.reload();
        })

    });



</script>

<script>
    $(function () {
        $("#bu").on('click', function () {
            layer.open({
                type: 2,
                title: '添加出库',
                shadeClose: true,
                shade: false,
                maxmin: true, //开启最大化最小化按钮
                area: ['1000px', '600px'],
                content: '/warehouse/warehouse_crk/out_addPage',
            });
        });
    });
</script>
<script>
    $(function () {
        $("#bb").on('click', function () {
            layer.open({
                type: 2,
                title: '添加入库',
                shadeClose: true,
                shade: false,
                maxmin: true, //开启最大化最小化按钮
                area: ['1500px', '600px'],
                content: '/warehouse/warehouse_crk/storage_addPage',
            });
        });
    });
</script>
